<?php

declare(strict_types=1);
/**
 * This file is part of habo_new_media.
 *
 * @link     https://www.berlen.cn/
 * @contact  tech@berlen.cn
 * @license  http://gitlab.rehou.cn/habo/habo_new_media/-/blob/master/README.md
 */

namespace app\enum;

class ReportRecordEnum
{
    // 历史数据添加时间
    public const SEND_TIME = [
        0 => '1',
        1 => '10',
    ];

    public const CACHE_CONFIG = [
        'report_record_fetch' => 'task:report:fetch:' . RedisEnum::REDIS_LIST,
        'push_report_record_list' => 'task:report:push:' . RedisEnum::REDIS_LIST,
        'report_record_historical_fetch' => 'task:report:historical:' . RedisEnum::REDIS_LIST,
        'report_pull_fetch' => 'task:report:fetch:' . RedisEnum::REDIS_LIST,
        'report_process_fetch' => 'task:process:fetch:' . RedisEnum::REDIS_LIST,
        'report_send_fetch' => 'task:send:fetch:' . RedisEnum::REDIS_LIST,
    ];

    public const CONFIG_KEY = [
        'report_pull_fetch' => 'task:report:pull:fetch:' . RedisEnum::REDIS_LIST, // 报表拉取数据key
        'report_history_fetch' => 'task:report:history:fetch:' . RedisEnum::REDIS_LIST, // 更新历史数据key
        'report_process_fetch' => 'task:report:process:fetch:' . RedisEnum::REDIS_LIST, // 生成报表数据key
        'report_send_fetch' => 'task:report:send:fetch:' . RedisEnum::REDIS_LIST, // 发送报表文件key
    ];

    public const CACHE_KEY = [
        'report_data_fetch' => 'task:report:data:fetch:' . RedisEnum::REDIS_LIST, // 报表拉取数据key
        'report_file_fetch' => 'task:report:file:fetch:' . RedisEnum::REDIS_LIST, // 生成报表文件数据key
        'report_send_list' => 'task:report:send:list:' . RedisEnum::REDIS_LIST, // 发送报表文件key
    ];

    /**
     * 发送队列锁.
     * @var string 数据维度广告主
     */
    public const REPORT_EXCEL_SEND_LOCK_KEY = 'task:report:send:lock:%s:' . RedisEnum::REDIS_STRING;

    /**
     * 生成文件队列锁.
     * @var string 数据维度广告主
     */
    public const REPORT_EXCEL_FILE_LOCK_KEY = 'task:report:file:lock:%s:' . RedisEnum::REDIS_STRING;
    /**
     * @var int 数据维度广告主
     */
    public const REPORT_DIMENSION_ACCOUNT = 1;

    /**
     * @var int 数据维度计划
     */
    public const REPORT_DIMENSION_CAMPAIGN = 2;

    /**
     * @var int 数据维度广告组
     */
    public const REPORT_DIMENSION_UNIT = 3;

    // 巨量
    public const OE_MEDIA = 1;

    // 快手
    public const KS_MEDIA = 2;

    // 时报类型
    public const REPORT_DATE_TYPE_TIME = 1;

    // 日报类型
    public const REPORT_DATE_TYPE_DAY = 2;

    public const REPORT_RECORD_PUSH_MODE_MAILBOX = 1; // 邮箱

    public const REPORT_RECORD_PUSH_MODE_NAIL = 2; // 钉钉

    public const REPORT_RECORD_PUSH_MODE_FS = 3; // 飞书

    public const REPORT_RECORD_PUSH_MODE_QYWX = 4; // 企业微信

    /**
     * @var int 飞书webhook
     */
    public const REPORT_RECORD_FS_WEBHOOK = 5;

    /**
     * @var int 钉钉webhook
     */
    public const REPORT_RECORD_DING_TALK_WEBHOOK = 6;

    /**
     * @var int 企业微信webhook
     */
    public const REPORT_RECORD_WE_CHAT_WEBHOOK = 7;
    // 报表类型
    public const REPORT_RECORD_DATE_TYPE = [
        1 => '时报',
        2 => '日报',
    ];

    /**
     * 代理商.
     */
    public const AGENT = '上海艾秒广告有限公司';

    /**
     * 媒体名称.
     */
    public const OE_MEDIA_NAME = '头条-巨量引擎';

    /**
     * 媒体名称.
     */
    public const KS_MEDIA_NAME = '快手-磁力引擎';

    // 钉钉返回参数
    public const DING_CARD_TEMPLATE = '{
  "config": {
    "autoLayout": true,
    "enableForward": true
  },
  "header": {
    "title": {
      "type": "text",
      "text": "V2%s",
      "color": "common_blue1_color"
    },
    "logo": "@lALPDtXaA1csu9g4MA"
  },
  "contents": [
    {
      "type": "markdown",
      "text": "**%s**",
      "id": "markdown_1654854788047"
    },
    {
      "type": "section",
      "fields": {
        "shortContent": true,
        "list": [
          {
            "type": "text",
            "text": "📅 报表日期：%s",
            "id": "text_1654854788120"
          },
          {
            "type": "text",
            "text": "🕙 报表时间：%s",
            "id": "text_1654854788136"
          }
        ]
      },
      "id": "section_1654854788047"
    },
    {
      "type": "action",
      "actions": [
        {
          "type": "button",
          "label": {
            "type": "text",
            "text": "查看报表详情",
            "id": "text_1654856336648"
          },
          "iconCode": "icon_XDS_Search",
          "actionType": "openLink",
          "url": {
            "all": "%s"
          },
          "status": "primary",
          "id": "button_1654856336648"
        }
      ],
      "id": "action_1654856336648"
}
  ]
}';

    public const DING_CARD_TEMPLATE_V3 = '{
  "config": {
    "autoLayout": true,
    "enableForward": true
  },
  "header": {
    "title": {
      "type": "text",
      "text": "V2%s",
      "color": "common_blue1_color"
    },
    "logo": "@lALPDtXaA1csu9g4MA"
  },
  "contents": [
    {
      "type": "markdown",
      "text": "**%s**",
      "id": "markdown_1654854788047"
    },
    {
      "type": "section",
      "fields": {
        "shortContent": true,
        "list": [
          {
            "type": "text",
            "text": "📅 报表日期：%s",
            "id": "text_1654854788120"
          },
          {
            "type": "text",
            "text": "🕙 报表时间：%s",
            "id": "text_1654854788136"
          }
        ]
      },
      "id": "section_1654854788047"
    },
    {
      "type": "action",
      "actions": [
        {
          "type": "button",
          "label": {
            "type": "text",
            "text": "查看报表详情",
            "id": "text_1654856336648"
          },
          "iconCode": "icon_XDS_Search",
          "actionType": "openLink",
          "url": {
            "all": "%s"
          },
          "status": "primary",
          "id": "button_1654856336648"
        }
      ],
      "id": "action_1654856336648"
}
  ]
}';

    public const REPORT_FIELDS_OE = [
        'ad_name' => '计划名称',
        'ad_id' => '计划ID',
        'campaign_name' => '广告组名称',
        'campaign_id' => '广告组ID',
        'account_name' => '账户名称',
        'advertiser_id' => '账户ID',
        'agent' => '代理商',
        'media' => '媒体',
        'product_name' => '产品',
        'status' => '计划状态',
        'landing_type' => '推广目的',
        'delivery_range' => '投放范围',
        'operation_name' => '优化师',
        'convert_id' => '转化目标',
        'download_type' => '下载方式',
        'roi_goal' => 'ROI系数',
        'deep_external_action' => '深度转化目标',
        'smart_bid_type' => '出价方式',
        'inventory_type' => '投放位置',
        'deep_cpabid' => '深度转化出价',
        'bid' => '出价（元）',
        'budget' => '预算（元）',
        'create_time' => '创建时间',
        'date' => '日期',
        'time' => '时间',
        'cost' => '总花费',
        'show' => '展示数',
        'avg_show_cost' => '平均千次展现费用',
        'click' => '点击数',
        'avg_click_cost' => '平均点击单价',
        'ctr' => '点击率',
        'cash_cost' => '折后消耗',
        'folding_convert' => '折后成本',
        'yesterday_cost_rate' => '昨日同时段消耗环比',
        'yesterday_cost' => '昨日同时段消耗',
        'convert' => '转化数',
        'convert_cost' => '转化成本',
        // 'yesterday_convert_rate' => '昨日成本环比',
        'convert_rate' => '转化率',
        'deep_convert' => '深度转化数',
        'deep_convert_cost' => '深度转化成本',
        'deep_convert_rate' => '深度转化率',
        'attribution_convert' => '转化数（计费时间）',
        'attribution_convert_cost' => '转化成本（计费时间）',
        'attribution_deep_convert' => '深度转化数（计费时间）',
        'attribution_deep_convert_cost' => '深度转化成本（计费时间）',
        'download_start' => '安卓下载开始数',
        'download_start_cost' => '安卓下载开始成本',
        'download_start_rate' => '安卓下载开始率',
        'download_finish' => '安卓下载完成数',
        'download_finish_cost' => '安卓下载完成成本',
        'download_finish_rate' => '安卓下载完成率',
        // 'click_install' => '点击安装数',
        'install_finish' => '安卓安装完成数',
        'install_finish_cost' => '安卓安装完成成本',
        'install_finish_rate' => '安卓安装完成率',
        'active' => '激活数',
        'active_cost' => '激活成本',
        'active_rate' => '激活率',
        'register' => '注册数',
        'active_register_cost' => '注册成本',
        'active_register_rate' => '注册率',
        'attribution_next_day_open_cnt' => '次留数',
        'attribution_next_day_open_cost' => '次留成本',
        'attribution_next_day_open_rate' => '次留率',
        'attribution_retention_2d_cnt' => '2日留存数',
        'attribution_retention_2d_cost' => '2日留存成本',
        'attribution_retention_2d_rate' => '2日留存率',
        'attribution_retention_3d_cnt' => '3日留存数',
        'attribution_retention_3d_cost' => '3日留存成本',
        'attribution_retention_3d_rate' => '3日留存率',
        'attribution_retention_4d_cnt' => '4日留存数',
        'attribution_retention_4d_cost' => '4日留存成本',
        'attribution_retention_4d_rate' => '4日留存率',
        'attribution_retention_5d_cnt' => '5日留存数',
        'attribution_retention_5d_cost' => '5日留存成本',
        'attribution_retention_5d_rate' => '5日留存率',
        'attribution_retention_6d_cnt' => '6日留存数',
        'attribution_retention_6d_cost' => '6日留存成本',
        'attribution_retention_6d_rate' => '6日留存率',
        'attribution_retention_7d_cnt' => '7日留存数',
        'attribution_retention_7d_cost' => '7日留存成本',
        'attribution_retention_7d_rate' => '7日留存率',
        'game_addiction' => '关键行为数',
        'game_addiction_cost' => '关键行为成本',
        'game_addiction_rate' => '关键行为率',
        'pay_count' => '首次付费数',
        'active_pay_cost' => '首次付费成本',
        'active_pay_rate' => '首次付费率',
        'active_pay_ringgit' => '付费成本环比',
        'game_pay_cost' => '付费成本',
        'game_pay_count' => '付费次数',
        'attribution_game_pay_7d_count' => '7日付费次数(激活时间)',
        'attribution_game_pay_7d_cost' => '7日付费成本(激活时间)',
        'attribution_active_pay_7d_per_count' => '7日人均付费次数(激活时间)',
        'loan_completion' => '完件数',
        'loan_completion_cost' => '完件成本',
        'loan_completion_rate' => '完件率',
        'pre_loan_credit' => '预授信数',
        'pre_loan_credit_cost' => '预授信成本',
        'loan_credit' => '授信数',
        'loan_credit_cost' => '授信成本',
        'loan_credit_rate' => '授信率',
        'in_app_uv' => 'APP内访问',
        'in_app_detail_uv' => 'APP内访问详情页',
        'in_app_cart' => 'APP内加入购物车',
        'in_app_pay' => 'APP内付费',
        'in_app_order' => 'APP内下单',
        'phone' => '点击电话按钮',
        'form' => '表单提交',
        'total_play' => '播放数',
        'valid_play' => '有效播放数',
        'valid_play_cost' => '有效播放成本',
        'valid_play_rate' => '有效播放率',
        'share' => '分享数',
        'comment' => '评论提交数',
        'like' => '点赞数',
        'follow' => '新增关注数',
        'message_action' => '私信数',
        'attribution_game_in_app_ltv_1day' => '当日付费金额',
        'attribution_game_in_app_roi_1day' => '当日付费ROI',
        //         'active_pay_intra_day_count'=>'激活当日首次付费数',
        //         'active_pay_intra_day_cost'=>'激活当日首次付费成本',
        //         'active_pay_intra_day_rate'=>'激活当日首次付费率',
    ];

    public const REPORT_FIELDS_KS = [
        'unit_name' => '广告组名称',
        'unit_id' => '广告组ID',
        'campaign_name' => '计划名称',
        'campaign_id' => '计划ID',
        'account_name' => '账户名称',
        'advertiser_id' => '账户ID',
        'operation_name' => '优化师',
        'agent' => '代理商',
        'media' => '媒体',
        'product_name' => '产品',
        'target' => '定向方式',
        'ocpx_action_type' => '优化目标',
        'deep_conversion_type' => '深度转化目标',
        'bid' => '出价',
        'deep_conversion_bid' => '深度出价',
        'roi_ratio' => 'ROI系数',
        'day_budget' => '日预算',
        'create_time' => '创建时间',
        'date' => '日期',
        'time' => '时间',

        'charge' => '总花费',
        'show' => '封面曝光数',
        'photo_click' => '封面点击数',
        'aclick' => '素材曝光数',
        'bclick' => '行为数',
        'photo_click_ratio' => '封面点击率',
        'aclick_ratio' => '素材点击率',
        'cash_cost' => '折后消耗',
        'folding_convert' => '折后成本',
        'yesterday_cost_ratio' => '昨日同时段消耗环比',
        'yesterday_cost' => '昨日同时段消耗',
        'show_1k_cost' => '平均千次封面曝光花费',
        'aclick_1k_cost' => '平均千次素材曝光花费',
        // 'impression_1k_cost' => '平均千次曝光花费',
        'photo_click_cost' => '平均点击单价',
        'action_cost' => '平均行为单价',
        'download_started' => '安卓下载开始数',
        'download_completed' => '安卓下载完成数',
        'download_completed_cost' => '安卓下载完成单价',
        'download_completed_ratio' => '安卓下载完成率',
        'download_started_cost' => '安卓下载开始单价',
        'download_started_ratio' => '安卓下载开始单价',
        'key_action' => '关键行为数',
        'key_action_cost' => '关键行为成本',
        'key_action_ratio' => '关键行为率',
        'activation' => '激活数',
        'conversion_cost' => '激活成本',
        'download_conversion_ratio' => '下载完成激活率',
        'event_new_user_pay' => '新增付费人数',
        'event_new_user_pay_cost' => '新增付费人数成本',
        'event_new_user_pay_ratio' => '新增付费人数率',
        'event_new_user_pay_ringgit' => '付费成本环比',
        'event_register' => '注册数',
        'event_register_cost' => '注册成本',
        'event_register_ratio' => '注册率',
        'event_pay_first_day' => '首日付费次数',
        'event_pay_purchase_amount_first_day' => '首日付费金额',
        'event_pay_first_day_cost' => '首日付费次数成本',
        'event_pay_first_day_roi' => '首日ROI',
        'event_pay' => '付费次数',
        'event_pay_purchase_amount' => '付费金额',
        'event_pay_cost' => '付费次数成本',
        'event_pay_roi' => 'ROI',
        'event_next_day_stay' => '次日留存数',
        'event_next_day_stay_cost' => '次日留存成本',
        'event_next_day_stay_ratio' => '次留率',
        'yesterday_event_next_day_stay' => '昨日次留数',
        'yesterday_event_next_day_stay_cost' => '昨日次留成本',
        'yesterday_event_next_day_stay_ratio' => '昨日次留率',
        'event_jin_jian_app' => '完件数',
        'event_jin_jian_app_cost' => '完件成本',
        'form_count' => '表单提交数',
        'event_wechat_connected' => '微信加粉数',
        'form_cost' => '表单提交单价',
        'form_action_ratio' => '表单提交点击率',
        'event_valid_clues' => '有效线索数',
        'event_valid_clues_cost' => '有效线索成本',
        'event_new_user_jinjian_app' => '新增完件人数',
        'event_new_user_jinjian_app_cost' => '新增完件人数成本',
        'event_new_user_jinjian_app_roi' => '新增完件人数率',
        'event_new_user_credit_grant_app' => '新增授信人数',
        'event_new_user_credit_grant_app_cost' => '新增授信人数成本',
        'event_new_user_credit_grant_app_roi' => '新增授信人数率',
        'event_credit_grant_first_day_app' => ' app首日授信数',
        'event_order_paid_roi' => ' 订单支付率',
        'event_order_submit' => ' 提交订单数',
        'event_add_shopping_cart' => ' 添加购物车数',
        'event_add_shopping_cart_cost' => ' 添加购物车成本',
        'event_watch_app_ad' => ' 广告观看',
        'event_ad_watch_times' => ' 广告观看次数',
        'event_ad_watch_times_ratio' => ' 广告观看次数转化率',
        'event_ad_watch_times_cost' => ' 广告观看次数成本',
        'event_credit_grant_app' => '授信数',
        'event_credit_grant_app_cost' => '授信成本',
        'event_credit_grant_app_ratio' => '授信率',
        'event_app_invoked' => '唤醒应用数',
        'event_app_invoked_cost' => '唤醒应用成本',
        'event_app_invoked_ratio' => '唤醒应用率',
        'conversion_num_by_impression_7d' => '转化数(计费时间)',
    ];

    public const MEDIA_FIELD_VALUE_RULE = [
        CommonEnum::OE_MEDIA => [
            'avg_show_cost' => [ // 平均千次展现费用
                'func' => 'bc_div',
                'args' => ['cost|strval', 'show|strval', 6],
                'callback' => 'getPercentFloatingKilo',
                'default' => 'show|0',
            ],
            'avg_click_cost' => [ // 平均点击单价
                'func' => 'bc_div',
                'args' => ['cost|strval', 'click|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'ctr' => [ // 点击率
                'func' => 'bc_div',
                'args' => ['click|strval', 'show|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'convert_cost' => [ // 转化成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'convert|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'convert_rate' => [ // 转化率
                'func' => 'bc_div',
                'args' => ['convert|strval', 'click|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'deep_convert_cost' => [ // 深度转化成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'deep_convert|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'deep_convert_rate' => [ // 深度转化率
                'func' => 'bc_div',
                'args' => ['deep_convert|strval', 'convert|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'attribution_convert_cost' => [ // 转化成本（计费时间）
                'func' => 'bc_div',
                'args' => ['cost|strval', 'attribution_convert|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'attribution_deep_convert' => [ // 深度转化数（计费时间）
                'func' => 'bc_div',
                'args' => ['cost|strval', 'attribution_deep_convert|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'download_start_cost' => [ // 安卓下载开始成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'download_start|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'download_start_rate' => [ // 安卓下载开始率
                'func' => 'bc_div',
                'args' => ['download_start|strval', 'click|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'download_finish_cost' => [ // 安卓下载完成成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'download_finish|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'download_finish_rate' => [ // 安卓下载完成率
                'func' => 'bc_div',
                'args' => ['download_finish|strval', 'download_start|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'install_finish_cost' => [ // 安卓安装完成成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'install_finish|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'install_finish_rate' => [ // 安卓安装完成率
                'func' => 'bc_div',
                'args' => ['install_finish|strval', 'download_finish|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'active_cost' => [ // 激活成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'active|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'active_rate' => [ // 激活率
                'func' => 'bc_div',
                'args' => ['active|strval', 'click|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'active_register_cost' => [ // 注册成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'register|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'active_register_rate' => [ // 注册率
                'func' => 'bc_div',
                'args' => ['register|strval', 'active|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'game_addiction_cost' => [ // 关键行为成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'game_addiction|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'game_addiction_rate' => [ // 关键行为率
                'func' => 'bc_div',
                'args' => ['game_addiction|strval', 'active|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'active_pay_cost' => [ // 首次付费成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'pay_count|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'active_pay_rate' => [ // 首次付费率
                'func' => 'bc_div',
                'args' => ['pay_count|strval', 'active|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'game_pay_cost' => [ // 付费成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'game_pay_count|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'game_pay_rate' => [ // 付费率
                'func' => 'bc_div',
                'args' => ['game_pay_count|strval', 'active|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'attribution_game_pay_7d_cost' => [ // 7日付费成本(激活时间)
                'func' => 'bc_div',
                'args' => ['cost|strval', 'attribution_game_pay_7d_count|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'attribution_retention_2d_cost' => [ // 2日留存成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'attribution_retention_2d_cnt|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'attribution_retention_2d_rate' => [ // 2日留存率
                'func' => 'bc_div',
                'args' => ['attribution_retention_2d_cnt|strval', 'active|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'attribution_retention_3d_cost' => [ // 3日留存成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'attribution_retention_3d_cnt|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'attribution_retention_3d_rate' => [ // 3日留存率
                'func' => 'bc_div',
                'args' => ['attribution_retention_3d_cnt|strval', 'active|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'attribution_retention_4d_cost' => [ // 4日留存成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'attribution_retention_4d_cnt|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'attribution_retention_4d_rate' => [ // 4日留存率
                'func' => 'bc_div',
                'args' => ['attribution_retention_4d_cnt|strval', 'active|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'attribution_retention_5d_cost' => [ // 5日留存成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'attribution_retention_5d_cnt|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'attribution_retention_5d_rate' => [ // 5日留存率
                'func' => 'bc_div',
                'args' => ['attribution_retention_5d_cnt|strval', 'active|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'attribution_retention_6d_cost' => [ // 6日留存成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'attribution_retention_6d_cnt|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'attribution_retention_6d_rate' => [ // 6日留存率
                'func' => 'bc_div',
                'args' => ['attribution_retention_6d_cnt|strval', 'active|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'attribution_retention_7d_cost' => [ // 7日留存成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'attribution_retention_7d_cnt|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'attribution_retention_7d_rate' => [ // 7日留存率
                'func' => 'bc_div',
                'args' => ['attribution_retention_7d_cnt|strval', 'active|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'loan_completion_cost' => [ // 完件成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'loan_completion|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'loan_completion_rate' => [ // 完件率
                'func' => 'bc_div',
                'args' => ['loan_completion|strval', 'register|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'loan_credit_cost' => [ // 授信成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'loan_credit|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'loan_credit_rate' => [ // 授信率
                'func' => 'bc_div',
                'args' => ['loan_credit|strval', 'loan_completion|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'valid_play_cost' => [ // 有效播放成本
                'func' => 'bc_div',
                'args' => ['cost|strval', 'valid_play|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'valid_play_rate' => [ // 有效播放率
                'func' => 'bc_div',
                'args' => ['valid_play|strval', 'show|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'attribution_game_in_app_roi_1day' => [ // 当日付费ROI
                'func' => 'bc_div',
                'args' => ['attribution_game_in_app_ltv_1day|strval', 'cost|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
        ],
        CommonEnum::KS_MEDIA => [
            'photo_click_ratio' => [ // 封面点击率
                'func' => 'bc_div',
                'args' => ['photo_click|strval', 'show|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'aclick_ratio' => [ // 素材点击率
                'func' => 'bc_div',
                'args' => ['bclick|strval', 'aclick|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'show_1k_cost' => [ // 平均千次封面曝光花费
                'func' => 'bc_div',
                'args' => ['charge|strval', 'show|strval', 6],
                'callback' => 'getPercentFloatingKilo',
                'default' => 'show|0',
            ],
            'aclick_1k_cost' => [ // 平均千次素材曝光花费
                'func' => 'bc_div',
                'args' => ['charge|strval', 'aclick|strval', 6],
                'callback' => 'getPercentFloatingKilo',
                'default' => 'show|0',
            ],
            'photo_click_cost' => [ // 平均点击单价
                'func' => 'bc_div',
                'args' => ['charge|strval', 'photo_click|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'action_cost' => [ // 平均行为单价
                'func' => 'bc_div',
                'args' => ['charge|strval', 'bclick|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'download_started_cost' => [ // 安卓下载开始单价
                'func' => 'bc_div',
                'args' => ['charge|strval', 'download_started|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'download_started_ratio' => [ // 安卓下载开始率
                'func' => 'bc_div',
                'args' => ['download_started|strval', 'bclick|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'download_completed_cost' => [ // 安卓下载完成单价
                'func' => 'bc_div',
                'args' => ['charge|strval', 'download_completed|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'download_completed_ratio' => [ // 安卓下载完成率
                'func' => 'bc_div',
                'args' => ['download_completed|strval', 'download_started|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'conversion_cost' => [ // 激活单价
                'func' => 'bc_div',
                'args' => ['charge|strval', 'activation|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'key_action_cost' => [ // 关键行为成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'key_action|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'key_action_ratio' => [ // 关键行为率
                'func' => 'bc_div',
                'args' => ['key_action|strval', 'activation|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'download_conversion_ratio' => [ // 下载完成激活率
                'func' => 'bc_div',
                'args' => ['activation|strval', 'download_completed|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'event_register_cost' => [ // 注册成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_register|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_register_ratio' => [ // 注册率
                'func' => 'bc_div',
                'args' => ['event_register|strval', 'activation|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'event_pay_first_day_cost' => [ // 首日付费次数成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_pay_first_day|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_pay_cost' => [ // 付费次数成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_pay|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_pay_roi' => [ // ROI
                'func' => 'bc_div',
                'args' => ['event_pay_purchase_amount|strval', 'charge|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_jin_jian_app_cost' => [ // 完件成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_jin_jian_app|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'form_cost' => [ // 表单提交单价
                'func' => 'bc_div',
                'args' => ['charge|strval', 'form_count|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'form_action_ratio' => [ // 表单提交点击率
                'func' => 'bc_div',
                'args' => ['form_count|strval', 'activation|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'event_new_user_pay_cost' => [ // 新增付费人数成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_new_user_pay|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_new_user_pay_ratio' => [ // 新增付费人数率
                'func' => 'bc_div',
                'args' => ['event_new_user_pay|strval', 'activation|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'event_valid_clues_cost' => [ // 有效线索成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_valid_clues|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_new_user_jinjian_app_cost' => [ // 新增完件人数成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_new_user_jinjian_app|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_new_user_jinjian_app_roi' => [ // 新增完件人数率
                'func' => 'bc_div',
                'args' => ['event_new_user_jinjian_app|strval', 'activation|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'event_credit_grant_app_cost' => [ // 授信成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_credit_grant_app|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_credit_grant_app_ratio' => [ // 授信率
                'func' => 'bc_div',
                'args' => ['event_credit_grant_app|strval', 'event_jin_jian_app|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'event_new_user_credit_grant_app_cost' => [ // 新增授信人数成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_new_user_credit_grant_app|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_new_user_credit_grant_app_roi' => [ // 新增授信人数率
                'func' => 'bc_div',
                'args' => ['event_new_user_credit_grant_app|strval', 'activation|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'event_add_shopping_cart_cost' => [ // 添加购物车成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_add_shopping_cart|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_ad_watch_times_cost' => [ // 广告观看次数成本
                'func' => 'bc_div',
                'args' => ['charge|strval', 'event_ad_watch_times|strval', 6],
                'callback' => 'getPercentFloating',
                'default' => 'show|0',
            ],
            'event_ad_watch_times_ratio' => [ // 广告观看次数转化率
                'func' => 'bc_div',
                'args' => ['event_ad_watch_times|strval', 'activation|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
            'event_app_invoked_ratio' => [ // 唤醒应用率
                'func' => 'bc_div',
                'args' => ['event_app_invoked|strval', 'bclick|strval', 6],
                'callback' => 'getPercentWithTwo',
                'default' => 'show|0%',
            ],
        ],
    ];
}
